const state = {
  current: '',
  leftNav: 'all',
  classify: ['doc', 'pic', 'seed', 'video', 'music', 'other']
};

const getters = {
  getCurrent: state => {
    return state.current;
  },
  getIsClassify: state => {
    return state.classify.indexOf(state.leftNav) >= 0;
  },
  getClassifyType: state => {
    return state.leftNav.toUpperCase();
  },
};

const mutations = {
  saveCurrent(state, data) {
    state.current = data.current
  },
  saveLeftNav(state, data) {
    state.leftNav = data
  },
};

const actions = {

};

export default {
  state,
  getters,
  mutations,
  actions
};